#include<stdio.h>
#include<string.h>

int main(void)
{
	int length;
	char ch[30];
	scanf("%s",ch);
	length=strlen(ch);
	
	if(ch[length-1]=='y')
	{
		ch[length-1]='i';
		printf("%ses",ch);
	}
	else
	{
		if(ch[length-1]=='o'||ch[length-1]=='s'||ch[length-1]=='x'||(ch[length-1]=='h'&&(ch[length-2]=='c'||ch[length-2]=='s')))
		{
			printf("%ses",ch);
		}
		else
		{
			printf("%ss",ch);
		}
	}
	
	return 0;
}
